package com.itheimaoa.domain.process;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import com.itheimaoa.domain.customer.Customer;

/**
 * 用户申请表
 */
public class Apply {
	public static final String SUBMIT_RESUME = "申请流程已经启动，接下来提交您的自荐信";

	public static final String RESUME_WAIT = "自荐信已提交，等待审批";
	public static final String RESUME_NOPASS = "自荐信没有通过，请重新提交自荐信";
	public static final String SUBMIT_TEST = "自荐信已通过，请提交您的基础测试题";

	public static final String TEST_WAIT = "基础测试已提交，等待审批";
	public static final String TEST_NOPASS = "基础测试没有通过，请重新提交基础测试";
	public static final String SUBMIT_QUALIFICATION = "基础测试已通过，请提交您的入学考试资格申请";

	public static final String QUALIFICATION_WAIT = "入学考试资格申请已提交，等待审批";
	public static final String QUALIFICATION_NOPASS = "入学考试资格申请没有通过，请重新提交入学考试资格申请";
	public static final String SUBMIT_EXAM = "入学考试资格申请已通过，请提交您的提交入学考试题";

	public static final String EXAM_WAIT = "入学考试申请已提交，等待审批";
	public static final String EXAM_NOPASS = "入学考试申请没有通过，请重新提交入学考试申请";
	public static final String SUBMIT_AUDITION = "入学考试申请已通过，请申请面试";
	
	
	public static final String AUDITION_WAIT = "面试申请已提交，等待审批";
	public static final String AUDITION_NOPASS = "面试申请没有通过，请重新提交面试申请";
	public static final String SUBMIT_ENTRANCE = "面试申请已通过，申请分配入学名额";
	public static final String INTERVIEWTIME = "面试时间已安排，请准时参加面试。";

	/*
	 * public static final String TEST_WAIT = "入学考试题已提交，请等待审批"; public static
	 * final String TEST_NOPASS = "入学没有通过，请重新提交入学考试"; public static final String
	 * CUSTOMER_OVER = "用户主动中止流程"; public static final String EMPLOYEE_OVER =
	 * "黑马管理员中止流程"; public static final String SUCCESS = "您已通过所有测试，恭喜入学"; public
	 * static final String FAILURE = "很遗憾，您的入学申请没有通过";
	 */

	private String aid;
	private String title;
	private Customer customer;
	private String courseName = FinalParam.JAVA_YUN;// 意向课程
	private String className = FinalParam.YUN3;// 意向班级

	private Date applyTime = new Date();// 申请时间
	private String status = SUBMIT_RESUME;// 入学申请的状态，用常量表示
	private Double score = 0d; // 申请得分
	private Double extraScore = 0d;// 其它加分
	private Boolean close = false; // 申请是否结束
	private Boolean success = false; // 申请是否成功
	private Date lastAccessTime; // 最后访问时间

	private String pi; // 和这个申请相关联的流程实例id
	
	private Set<Resume> resumes = new HashSet<Resume>(); // 用户提交的自荐信
	private Set<Test> tests = new HashSet<Test>(); // 用户提交的入学测试题
	private Set<Qualification> qualifications = new HashSet<Qualification>(); // 用户提交的入学考试资格
	private Set<Exam> exams = new HashSet<Exam>(); // 用户提交的入学考试
	private Set<Audition> auditions = new HashSet<Audition>(); // 用户面试

	/**
	 * 总得分
	 * 
	 * @return
	 */
	public Double getSumScore() {
		return score + extraScore;
	}

	public String getAid() {
		return aid;
	}

	public void setAid(String aid) {
		this.aid = aid;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Customer getCustomer() {
		return customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public String getCourseName() {
		return courseName;
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public Date getApplyTime() {
		return applyTime;
	}

	public void setApplyTime(Date applyTime) {
		this.applyTime = applyTime;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Double getScore() {
		return score;
	}

	public void setScore(Double score) {
		this.score = score;
	}

	public Double getExtraScore() {
		return extraScore;
	}

	public void setExtraScore(Double extraScore) {
		this.extraScore = extraScore;
	}

	public Boolean getClose() {
		return close;
	}

	public void setClose(Boolean close) {
		this.close = close;
	}

	public Boolean getSuccess() {
		return success;
	}

	public void setSuccess(Boolean success) {
		this.success = success;
	}

	public Date getLastAccessTime() {
		return lastAccessTime;
	}

	public void setLastAccessTime(Date lastAccessTime) {
		this.lastAccessTime = lastAccessTime;
	}

	public String getPi() {
		return pi;
	}

	public void setPi(String pi) {
		this.pi = pi;
	}

	public Set<Resume> getResumes() {
		return resumes;
	}

	public void setResumes(Set<Resume> resumes) {
		this.resumes = resumes;
	}

	public Set<Test> getTests() {
		return tests;
	}

	public void setTests(Set<Test> tests) {
		this.tests = tests;
	}

	public Set<Qualification> getQualifications() {
		return qualifications;
	}

	public void setQualifications(Set<Qualification> qualifications) {
		this.qualifications = qualifications;
	}

	public Set<Exam> getExams() {
		return exams;
	}

	public void setExams(Set<Exam> exams) {
		this.exams = exams;
	}

	public Set<Audition> getAuditions() {
		return auditions;
	}

	public void setAuditions(Set<Audition> auditions) {
		this.auditions = auditions;
	}

}
